package com.photography.wedding.service;


import com.photography.wedding.dao.UserMapper;
import com.photography.wedding.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserService {
    @Autowired
    private UserMapper userMapper;
    private int count = 0;

    public int deleteByPrimaryKey(String id){
        return userMapper.deleteByPrimaryKey(id);
    }

    public int insert(User record){
        return userMapper.insert(record);
    }

    public int insertSelective(User record){
        return userMapper.insertSelective(record);
    }

    public int updateByPrimaryKeySelective(User record){
        return userMapper.updateByPrimaryKeySelective(record);
    }

    public int updateByPrimaryKey(User record){
        return userMapper.updateByPrimaryKey(record);
    }

    public int updateAdminByPrimaryKey(User record){
        return userMapper.updateAdminByPrimaryKey(record);
    }

    public User selectByPrimaryKey(String id){
        return userMapper.selectByPrimaryKey(id);
    }

    public User getByUser(String name){
        return userMapper.selectUser(name);
    }

    public int updateUserPwd(User record) {
        return userMapper.updateUserPwd(record);
    }

    public int updateUserLev(User record) {
        return userMapper.updateUserLev(record);
    }


    public User selectPwd(User record) {
        return userMapper.selectPwd(record);
    }

    public List<User> selectAll() {
        return userMapper.selectAll();
    }

}
